<?php
use yii\helpers\Html;
use yii\widgets\LinkPager;
?>
    <ul>
        <?php foreach ($articles as $article): ?>
            <li>
                <?= Html::encode("{$article->title} ({$article->num})") ?>:
            </li>
        <?php endforeach; ?>
    </ul>
<!--控制分页显示的格式-->
<?= LinkPager::widget([
    'pagination' => $pagination,
    'maxButtonCount'=>5, //显示5页，默认最大为10
    'firstPageLabel' => '首页',
    'nextPageLabel' => '下一页',
    'prevPageLabel' => '上一页',
    'lastPageLabel' => '末页', ])
?>

